// src/logger/dto/create-logger.dto.ts
import { IsString, IsInt, Min, Max, IsOptional, Length } from 'class-validator'

export class CreateLoggerDto {
  @IsString()
  @Length(1, 255)
  name: string

  @IsString()
  param: string

  @IsInt()
  @Min(1)
  userId: number

  @IsString()
  userName: string

  @IsString()
  @Length(1, 45)
  ip: string

  @IsString()
  @Length(1, 10)
  method: string

  @IsString()
  @Length(1, 255)
  url: string

  @IsString()
  @Length(1, 255)
  userAgent: string

  @IsInt()
  @Min(-1)
  @Max(599)
  statusCode: number

  @IsInt()
  responseTime: number

  @IsInt()
  @Min(-1)
  @Max(599)
  responseData: string
}
